Skip to content

build: add CMake targets for merged binary generation and selective f… - #1850

Open
KillerInk wants to merge 2 commits into
bitaxeorg:masterfrom
KillerInk:build/merge-bin-targets
Open

build: add CMake targets for merged binary generation and selective f…#1850
KillerInk wants to merge 2 commits into
bitaxeorg:masterfrom
KillerInk:build/merge-bin-targets

Conversation

@KillerInk

Copy link
Copy Markdown
Contributor

…lash

Merge binary targets:

  • merge_bin_target: creates esp-miner-merged.bin (bootloader + partitions + firmware + OTA)
  • merge_bin_target_with_config: includes config from .cvs at 0x9000
    • Configurable via -DMERGE_CONFIG_CVS=config-XXX.cvs (default: config-401.cvs)
    • Uses ESP-IDF nvs_partition_gen.py to generate config.bin automatically
  • merge_bin_target_update: firmware + OTA only in hex format for OTA updates
  • merge_bin_target_all_configs: generates one merged binary per config-*.bin file

Flash targets (write individual components to preserve partitions):

  • flash_factory: full erase + write all partitions (first installation)
  • flash_update_keep_config: updates firmware, preserves NVS config at 0x9000
  • flash_with_config: includes config from .cvs, preserves OTA/www partitions
  • flash_config_only: erase + write NVS config only (0x9000-0x10000)
  • flash_app_only: erase + write firmware only (0x10000-0x500000)

These targets fix the issue where flashing a merged binary at 0x0 erased NVS config and OTA partitions up to 0xf12000, and provide cross-platform alternatives to the merge_bin.sh scripts.

Update readme.md with documentation for all targets and erase range table.

…lash

Merge binary targets:
- merge_bin_target: creates esp-miner-merged.bin (bootloader + partitions + firmware + OTA)
- merge_bin_target_with_config: includes config from .cvs at 0x9000
  - Configurable via -DMERGE_CONFIG_CVS=config-XXX.cvs (default: config-401.cvs)
  - Uses ESP-IDF nvs_partition_gen.py to generate config.bin automatically
- merge_bin_target_update: firmware + OTA only in hex format for OTA updates
- merge_bin_target_all_configs: generates one merged binary per config-*.bin file

Flash targets (write individual components to preserve partitions):
- flash_factory: full erase + write all partitions (first installation)
- flash_update_keep_config: updates firmware, preserves NVS config at 0x9000
- flash_with_config: includes config from .cvs, preserves OTA/www partitions
- flash_config_only: erase + write NVS config only (0x9000-0x10000)
- flash_app_only: erase + write firmware only (0x10000-0x500000)

These targets fix the issue where flashing a merged binary at 0x0 erased NVS
config and OTA partitions up to 0xf12000, and provide cross-platform alternatives
to the merge_bin.sh scripts.

Update readme.md with documentation for all targets and erase range table.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test Results

  2 files    2 suites   1s ⏱️
120 tests 120 ✅ 0 💤 0 ❌
122 runs  122 ✅ 0 💤 0 ❌

Results for commit 2a92184.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant